<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="GroupDataSet" targetNamespace="http://tempuri.org/GroupDataSet.xsd" xmlns:mstns="http://tempuri.org/GroupDataSet.xsd" xmlns="http://tempuri.org/GroupDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="1" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SocialNetworkConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="SocialNetworkConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.WLQuickApps.SocialNetwork.Data.Properties.Settings.GlobalReference.Default.SocialNetworkConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GroupTableAdapter" GeneratorDataComponentClassName="GroupTableAdapter" Name="Group" UserDataComponentName="GroupTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="[SocialNetwork].dbo.[Group]" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="GetData">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT        BaseItemID
FROM            [Group]</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="BaseItemID" DataSetColumn="BaseItemID" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="AddUserToGroup" Modifier="Public" Name="AddUserToGroup" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy" UserSourceName="AddUserToGroup">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>DELETE FROM UserGroup
WHERE BaseItemID = @BaseItemID
AND UserID = @userID;

INSERT INTO UserGroup
                         (BaseItemID, UserID, IsInviteAccepted, IsApprovedByOwner)
VALUES        (@BaseItemID,@userID, @isInviteAccepted, @isApprovedByOwner)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="BaseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="UserID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="UserID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="isInviteAccepted" ColumnName="IsInviteAccepted" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isInviteAccepted" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsInviteAccepted" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="isApprovedByOwner" ColumnName="IsApprovedByOwner" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isApprovedByOwner" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsApprovedByOwner" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorGetMethodName="GetDataBy10" GeneratorSourceName="ApproveAllUsers" Modifier="Public" Name="ApproveAllUsers" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy1" UserSourceName="ApproveAllUsers">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>UPDATE UserGroup
SET IsApprovedByOwner = 1
WHERE BaseItemID = @baseItemID
AND IsInviteAccepted = 1</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="CreateGroup" Modifier="Public" Name="CreateGroup" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy2" UserSourceName="CreateGroup">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>INSERT INTO [dbo].[Group] (BaseItemID)
VALUES (@baseItemID);

SELECT SCOPE_IDENTITY()</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="[SocialNetwork].dbo.[Group]" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="SocialNetwork.dbo.[Group]" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GetGroup" Modifier="Public" Name="GetGroup" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy3" UserSourceName="GetGroup">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT BaseItemID FROM [Group] WHERE (BaseItemID = @baseItemID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.[Group]" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetGroupsByNameAndType" GetMethodModifier="Public" GetMethodName="GetGroupsByNameAndType" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetGroupsByNameAndType" UserSourceName="GetGroupsByNameAndType1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS
(
SELECT        [Group].BaseItemID

		, ROW_NUMBER() over (order by [Group].BaseItemID) as RowID

FROM            [Group] INNER JOIN
                         BaseItem ON [Group].BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.Title LIKE @name) and (BaseItem.SubType like @groupType)

)

select * from PageTable
where RowID between (@startRowIndex + 1) and (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="name" ColumnName="Title" DataSourceName="" DataTypeServer="nvarchar(255)" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="255" SourceColumn="Title" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="groupType" ColumnName="SubType" DataSourceName="" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@groupType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetGroupsByNameAndTypeCount" Modifier="Public" Name="GetGroupsByNameAndTypeCount" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy4" UserSourceName="GetGroupsByNameAndTypeCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*)
FROM            [Group] INNER JOIN
                         BaseItem ON [Group].BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.Title LIKE @name) and (BaseItem.SubType like @groupType)
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="name" ColumnName="Title" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="nvarchar(255)" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="255" SourceColumn="Title" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="groupType" ColumnName="SubType" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@groupType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetGroupsForUserByType" GetMethodModifier="Public" GetMethodName="GetGroupsForUserByType" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetGroupsForUserByType" UserSourceName="GetGroupsForUserByType1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS
(
SELECT        [Group].BaseItemID

		, ROW_NUMBER() over (order by [Group].BaseItemID) as RowID

FROM            [Group] INNER JOIN
                         UserGroup ON [Group].BaseItemID = UserGroup.BaseItemID INNER JOIN
                         BaseItem ON [Group].BaseItemID = BaseItem.BaseItemID
WHERE        (UserGroup.UserID = @userID) AND ([BaseItem].SubType like @groupType) AND (UserGroup.IsInviteAccepted = @isInviteAccepted) AND 
                         (UserGroup.IsApprovedByOwner = @isApprovedByOwner)
)

select * from PageTable
where RowID between (@startRowIndex + 1) and (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="UserID" DataSourceName="" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="UserID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="groupType" ColumnName="SubType" DataSourceName="" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@groupType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="isInviteAccepted" ColumnName="IsInviteAccepted" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isInviteAccepted" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsInviteAccepted" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="isApprovedByOwner" ColumnName="IsApprovedByOwner" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isApprovedByOwner" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsApprovedByOwner" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetGroupsForUserByTypeCount" Modifier="Public" Name="GetGroupsForUserByTypeCount" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy5" UserSourceName="GetGroupsForUserByTypeCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT([Group].BaseItemID) FROM [Group] INNER JOIN
                         UserGroup ON [Group].BaseItemID = UserGroup.BaseItemID INNER JOIN
                         BaseItem ON [Group].BaseItemID = BaseItem.BaseItemID
                         WHERE (UserGroup.UserID = @userID) AND ([BaseItem].SubType like @groupType)
                         AND (UserGroup.IsInviteAccepted = @isInviteAccepted) AND 
                         (UserGroup.IsApprovedByOwner = @isApprovedByOwner)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="UserID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="UserID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="groupType" ColumnName="SubType" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@groupType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="isInviteAccepted" ColumnName="IsInviteAccepted" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isInviteAccepted" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsInviteAccepted" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="isApprovedByOwner" ColumnName="IsApprovedByOwner" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isApprovedByOwner" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IsApprovedByOwner" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorGetMethodName="GetDataBy7" GeneratorSourceName="HasUserJoinedGroup" Modifier="Public" Name="HasUserJoinedGroup" QueryType="Scalar" ScalarCallRetval="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy6" UserSourceName="HasUserJoinedGroup">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT CAST(COUNT(*) AS BIT) FROM UserGroup
WHERE UserID = @userID AND BaseItemID = @baseItemID
AND IsInviteAccepted = 1 AND IsApprovedByOwner = 1</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="UserID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="UserID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="HasUserRequestedToJoinGroup" Modifier="Public" Name="HasUserRequestedToJoinGroup" QueryType="Scalar" ScalarCallRetval="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy7" UserSourceName="HasUserRequestedToJoinGroup">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT CAST(COUNT(*) AS BIT) FROM UserGroup
WHERE UserID = @userID AND BaseItemID = @baseItemID
AND IsInviteAccepted = 1 AND IsApprovedByOwner = 0</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="UserID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="UserID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="IsUserInvitedToGroup" Modifier="Public" Name="IsUserInvitedToGroup" QueryType="Scalar" ScalarCallRetval="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy8" UserSourceName="IsUserInvitedToGroup">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT CAST(COUNT(*) AS BIT) FROM UserGroup
WHERE UserID = @userID AND BaseItemID = @baseItemID
AND IsApprovedByOwner = 1 AND IsInviteAccepted = 0</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="UserID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="UserID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.UserGroup" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="RemoveUserFromGroup" Modifier="Public" Name="RemoveUserFromGroup" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy9" UserSourceName="RemoveUserFromGroup">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>DELETE FROM UserGroup
WHERE        (BaseItemID = @baseItemID) AND (UserID = @userID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="[SocialNetwork].dbo.UserGroup" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="UserID" DataSourceName="[SocialNetwork].dbo.UserGroup" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="UserID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="GroupDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="GroupDataSet" msprop:Generator_DataSetName="GroupDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Group" msprop:Generator_UserTableName="Group" msprop:Generator_RowDeletedName="GroupRowDeleted" msprop:Generator_RowChangedName="GroupRowChanged" msprop:Generator_RowClassName="GroupRow" msprop:Generator_RowChangingName="GroupRowChanging" msprop:Generator_RowEvArgName="GroupRowChangeEvent" msprop:Generator_RowEvHandlerName="GroupRowChangeEventHandler" msprop:Generator_TableClassName="GroupDataTable" msprop:Generator_TableVarName="tableGroup" msprop:Generator_RowDeletingName="GroupRowDeleting" msprop:Generator_TablePropName="Group">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="BaseItemID" msprop:Generator_UserColumnName="BaseItemID" msprop:Generator_ColumnPropNameInRow="BaseItemID" msprop:Generator_ColumnVarNameInTable="columnBaseItemID" msprop:Generator_ColumnPropNameInTable="BaseItemIDColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Group" />
      <xs:field xpath="mstns:BaseItemID" />
    </xs:unique>
  </xs:element>
</xs:schema>